##############################################################################
# Filename: Robustness_AddtlControls.R
# Purpose: Produce SI Table A8
##############################################################################

source("Setup.R")
# Set neutral values for those in treatment groups who didn't write a comment
data_eval$CommentBiased[is.na(data_eval$CommentBiased)&data_eval$Article%in%c("DN","DP")] <- 0
data_eval$CommentFeeling[is.na(data_eval$CommentFeeling)&data_eval$Article%in%c("DN","DP")] <- 2

# Models
mod_correct_allctrl = lm(YesCorrect ~ ProBJP*Article
                          + CollegeGrad + NewsDaily + StrongInterestPolitics
                          + Age + Male + Zone + Hindu + Caste +
                          + HindiVersion
                          + SawFB,
                          data = data_eval)
mod_ww_allctrl = lm(YesWellWritten ~ ProBJP*Article
                         + CollegeGrad + NewsDaily + StrongInterestPolitics
                         + Age + Male + Zone + Hindu + Caste 
                         + HindiVersion
                         + SawFB,
                         data = data_eval)
mod_recm_allctrl = lm(YesRecommend ~ ProBJP*Article
                         + CollegeGrad + NewsDaily + StrongInterestPolitics
                         + Age + Male + Zone + Hindu + Caste 
                         + HindiVersion
                         + SawFB,
                         data = data_eval)
mod_bias_allctrls = lm(CommentBiased ~ ProBJP*Article 
                       + CollegeGrad + NewsDaily + StrongInterestPolitics
                       + Age + Male + Zone + Hindu + Caste 
                       + HindiVersion
                       + SawFB, 
                       data = data_eval)
mod_feel_allctrls = lm(as.numeric(CommentFeeling) ~ ProBJP*Article 
                         + CollegeGrad + NewsDaily + StrongInterestPolitics
                         + Age + Male + Zone + Hindu + Caste 
                         + HindiVersion
                         + SawFB,
                         data = data_eval)
mod_dem_allctrls = lm(as.numeric(op_dem) ~ ProBJP*Article
                        + CollegeGrad + NewsDaily + StrongInterestPolitics
                        + Age + Male + Zone + Hindu + Caste 
                        + HindiVersion
                        + SawFB,
                        data = data_op)

# Print
stargazer(mod_correct_allctrl, mod_ww_allctrl, mod_recm_allctrl, 
          mod_bias_allctrls, mod_feel_allctrls, 
          mod_dem_allctrls,
          align=TRUE,
          covariate.labels=c("Pro-BJP",
                             "Negative Article", "Positive Article",
                             "College Graduate", "Daily News", "Interested in Politics",
                             "Age", "Male",
                             "East", "North", "Northeast", "South", "West", 
                             "Hindu", "SC/ST", "OBC", "Forward", "Brahmin",
                             "Hindi Version", "Saw Ad on Facebook", 
                             "Pro-BJP x Negative Article","Pro-BJP x Positive Article"),
          omit.stat=c("LL","ser","f"), no.space=TRUE)
